package com.wuxf.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wuxf.entity.ResponseBodyEntity;
import com.wuxf.service.TicketService;

@Controller
@RequestMapping("ticket")
public class TicketController {

	@Autowired
	private TicketService ticketService;
	
	@RequestMapping("findResidueTicketNum")
	public @ResponseBody ResponseBodyEntity findResidueTicketNum(int userId,String ticketType) {
		ResponseBodyEntity responseBodyEntity = new ResponseBodyEntity();
		responseBodyEntity.setData(ticketService.findResidueTicketNum(userId, ticketType));
		responseBodyEntity.setState("1");
		responseBodyEntity.setMsg("查询剩余票数");
		return responseBodyEntity;
	}
	
	
}
